package com.ctos.ojbackendjudgeservice.judge.codeSandBox;


import com.ctos.ojbackendmodel.codesandbox.ExecuteCodeRequest;
import com.ctos.ojbackendmodel.codesandbox.ExecuteCodeResponse;
import lombok.extern.slf4j.Slf4j;

@Slf4j
public class CodeSanDBoxProxy implements CodeSandBox {

    private final CodeSandBox codeSandBox;

    public CodeSanDBoxProxy(CodeSandBox codeSandBox) {
        this.codeSandBox = codeSandBox;
    }


    @Override
    public ExecuteCodeResponse executeCode(ExecuteCodeRequest executeCoderequest) {
        log.info(executeCoderequest.toString());
        ExecuteCodeResponse executeCodeResponse = codeSandBox.executeCode(executeCoderequest);
        log.info(executeCodeResponse.toString());
        return executeCodeResponse;
    }
}
